
*		************************************************************************		*
*		************************************************************************		*
*		  File:				Analysis.do													*
*		  Date:				Nov 2019													*
*		  Author:			MG															*
*		  Purpose:			Making votes count with Internet voting						*
*							forthcoming in Political Behavior							*
*		  Stata version:	14															*
*		************************************************************************		*
*		************************************************************************		*





***************
** Preparations
***************

* Set Stata version
version 14

* The following user-written programs are required (de-comment to install)
*ssc install xtivreg2, replace
*ssc install ivreg2, replace
*ssc install ranktest, replace

* Set directory
cd "...\Replication files"

* Increase maximum matrix size
set matsize 2000

* Open dataset
use "Geneva_final.dta", replace

* Set macros
global addcovars = "loginc_pc logpop unemplrate foreigners_share sp_voteshare gps_voteshare age_20_34 age_35_49 age_50_64 age_65plus"

* Drop the 11 ballot proposals voted on the 3 voting days where i-voting was available in all municipalities
drop if generalized_ivoting == 1

* Unit trends
forvalues i = 6601/6645 {
gen unittrend`i' = 0
sum date
replace unittrend`i' = date - r(min) + 1 if municipality_code == `i'
}
forvalues i = 9250/9250 {
gen unittrend`i' = 0
sum date
replace unittrend`i' = date - r(min) + 1 if municipality_code == `i'
}

* Squared unit trends
forvalues i = 6601/6645 {
gen unittrendsq`i' = unittrend`i' * unittrend`i'
}
forvalues i = 9250/9250 {
gen unittrendsq`i' = unittrend`i' * unittrend`i'
}




************************************
** Table 1: Descriptives and balance
************************************

foreach var of varlist pop age_0_19 age_20_34 age_35_49 age_50_64 age_65plus belowsecondary_share secondary_share tertiary_share inc_pc {
di "Variable = `var'"
ttest `var' if id == 2010030701, by(ivotemun)
}




*********************************************
** Table 2: DiD estimates residual vote share
*********************************************


* Model 1: Federal & cantonal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)
		
* Model 2: Only federal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Only cantonal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)

	

	
	
*************************************************
** Table 3: Robustness checks residual vote share
*************************************************


* Model 1: Placebo check
xtreg residual_share ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 2: Add. controls
xtreg residual_share ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Simultaneous municipal contests
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)
		
* Model 4: Two-way clustered SEs
preserve
tab id, gen(iddummy)
xtivreg2 residual_share ivoting turnout iddummy* unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe ivar(municipality_code) clu(municipality_code date)
restore
	

	
	
		
*********************************************
** Table 4: DiD estimates referendum outcomes
*********************************************


* Model 1: Support Socialists
xtreg support_soc ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 2:Support Greens
xtreg support_gre ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 3:Support redistribution
xtreg support_redistr ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 4:Support cultural conservatism
xtreg support_cultcons ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)





************************************************
** Table S1: Residual vote share w/o expatriates
************************************************


* Model 1: Federal & cantonal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250, fe i(municipality_code) cl(municipality_code)
		
* Model 2: Only federal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250 & federal == 1, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Only cantonal
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250 & cantonal == 1, fe i(municipality_code) cl(municipality_code)




************************************************************
** Table S2: Residual vote share w/o controlling for turnout
************************************************************


* Model 1: Federal & cantonal
xtreg residual_share ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)
		
* Model 2: Only federal
xtreg residual_share ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Only cantonal
xtreg residual_share ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)





****************************************************************
** Table S3: Robustness checks residual vote share, federal only
****************************************************************

* Model 1: Placebo check
xtreg residual_share ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)

* Model 2: Add. controls
xtreg residual_share ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Simultaneous municipal contests
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1 & mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)
		
* Model 4: Two-way clustered SEs
preserve
tab id, gen(iddummy)
xtivreg2 residual_share ivoting turnout iddummy* unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe ivar(municipality_code) clu(municipality_code date)
restore



*****************************************************************
** Table S4: Robustness checks residual vote share, cantonal only
*****************************************************************

* Model 1: Placebo check
xtreg residual_share ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)

* Model 2: Add. controls
xtreg residual_share ivoting $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)
		
* Model 3: Simultaneous municipal contests
xtreg residual_share ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1 & mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)
		
* Model 4: Two-way clustered SEs
preserve
tab id, gen(iddummy)
xtivreg2 residual_share ivoting turnout iddummy* unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe ivar(municipality_code) clu(municipality_code date)
restore	
				



************************************************
** Table S5: Referendum outcomes w/o expatriates
************************************************				

* Model 1: Support Socialists
xtreg support_soc ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250, fe i(municipality_code) cl(municipality_code)

* Model 2: Support Greens
xtreg support_gre ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250, fe i(municipality_code) cl(municipality_code)

* Model 3: Support redistribution
xtreg support_redistr ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250, fe i(municipality_code) cl(municipality_code)

* Model 4: Support cultural conservatism
xtreg support_cultcons ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if municipality_code != 9250, fe i(municipality_code) cl(municipality_code)


				

************************************************************
** Table S6: Referendum outcomes w/o controlling for turnout
************************************************************

* Model 1: Support Socialists
xtreg support_soc ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 2: Support Greens
xtreg support_gre ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 3: Support redistribution
xtreg support_redistr ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 4: Support cultural conservatism
xtreg support_cultcons ivoting i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)




***********************************************
** Table S7: Placebo checks referendum outcomes
***********************************************


* Model 1: Support Socialists
xtreg support_soc ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 2: Support Greens
xtreg support_gre ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 3: Support redistribution
xtreg support_redistr ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 4: Support cultural conservatism
xtreg support_cultcons ivoting placebo turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)





*************************************************
** Table S8: Referendum outcomes w/ add. controls
*************************************************


* Model 1: Support Socialists
xtreg support_soc ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 2: Support Greens
xtreg support_gre ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 3: Support redistribution
xtreg support_redistr ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)

* Model 4: Support cultural conservatism
xtreg support_cultcons ivoting turnout $addcovars i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645, fe i(municipality_code) cl(municipality_code)





********************************************************************
** Table S9: Referendum outcomes w/o simultaneous municipal contests
********************************************************************


* Model 1: Support Socialists
xtreg support_soc ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)

* Model 2: Support Greens
xtreg support_gre ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)

* Model 3: Support redistribution
xtreg support_redistr ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)

* Model 4: Support cultural conservatism
xtreg support_cultcons ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if mun_refs == 0 & mun_ele == 0, fe i(municipality_code) cl(municipality_code)




***********************************************
** Table S10: Referendum outcomes, federal only
***********************************************


* Model 1: Support Socialists
xtreg support_soc ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)

* Model 2:Support Greens
xtreg support_gre ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)

* Model 3:Support redistribution
xtreg support_redistr ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)

* Model 4:Support cultural conservatism
xtreg support_cultcons ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if federal == 1, fe i(municipality_code) cl(municipality_code)




************************************************
** Table S11: Referendum outcomes, cantonal only
************************************************


* Model 1: Support Socialists
xtreg support_soc ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)

* Model 2:Support Greens
xtreg support_gre ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)

* Model 3:Support redistribution
xtreg support_redistr ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)

* Model 4:Support cultural conservatism
xtreg support_cultcons ivoting turnout i.id unittrend6601 - unittrend6645 unittrendsq6601 - unittrendsq6645 if cantonal == 1, fe i(municipality_code) cl(municipality_code)






***************************
** Figure 1: I-voting usage		
***************************

preserve
use "Geneva_final.dta", replace
keep if ivoting == 1
collapse ivote_rate, by(municipality_code date)
bysort date: egen mean_residents = mean(ivote_rate) if municipality_code != 9250
egen pickone = tag(date)


twoway ///
	(scatter ivote_rate date if municipality_code != 9250, mcolor(gs12) msymbol(circle)) ///
	(line mean_residents date if pickone == 1, sort lcolor(black) lwidth(thick) lpattern(solid)) ///
	(line ivote_rate date if municipality_code == 9250, sort lcolor(black) lwidth(thick) lpattern(dash)) ///
	, ///
	ytitle("Internet votes / votes cast (%)") yscale(noextend nofextend) ylabel(0(10)60, nogrid angle(horizontal)) ///
	xtitle("", margin(top)) xscale(noextend nofextend) ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Resident trials" 2 "Resident trials (means)" 3 "Expatriate trials") position(11) ring(0) cols(1) symxsize(*0.45)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
restore




*****************
** Figure 2: Maps		
*****************

* Available upon request




*****************************************************
** Figure 3: Pre-treatment trends residual vote share		
*****************************************************


* Data preparations
foreach var of varlist residual_share {
preserve
keep if date < td(26sep2004)

gen period = .
replace period = 1 if year == 2001
replace period = 2 if year == 2002
replace period = 3 if year == 2003
replace period = 4 if year == 2004

matrix mean1=J(4,1,.)
matrix var1=J(4,1,.)
matrix mean2=J(4,1,.)
matrix var2=J(4,1,.)

forvalues i=1(1)4{
capture reg `var' if ivotemun == 1 & period == `i', cl(municipality_code)
capture matrix mean1[`i',1]=e(b)  
capture matrix var1[`i',1]=e(V) 
capture reg `var' if ivotemun == 0 & period == `i', cl(municipality_code)
capture matrix mean2[`i',1]=e(b)  
capture matrix var2[`i',1]=e(V) 
}

svmat mean1, names(mean1)
svmat var1, names(var1)
svmat mean2, names(mean2)
svmat var2, names(var2)

gen mean11_low = mean11 - 1.96* sqrt(var11)
gen mean11_up = mean11 + 1.96* sqrt(var11)

gen mean21_low = mean21 - 1.96* sqrt(var21)
gen mean21_up = mean21 + 1.96* sqrt(var21)

gen x1 = _n + .05 in 1/4
gen x2 = _n - .05 in 1/4

keep x1 mean11 mean11_low mean11_up x2 mean21 mean21_low mean21_up
drop if x1 == .
save "pretreat_`var'.dta", replace
restore
}


* Figure
preserve
use "pretreat_residual_share.dta", replace
twoway ///
	(scatter mean11 x1, sort msymbol(O) mcolor(black)) ///
	(scatter mean21 x2, sort msymbol(O) mcolor(gs10)) ///
	(line mean11 x1, sort lcolor(black) lpattern(solid)) ///
	(line mean21 x2, sort lcolor(gs10) lpattern(dash)) ///
	(rcap mean11_up mean11_low x1, sort lcolor(black) lpattern(solid)) ///
	(rcap mean21_up mean21_low x2, sort lcolor(gs10) lpattern(solid)) ///
	, ///
	ytitle("Residual vote share" "(annual averages in %)") yscale(noextend nofextend) ylabel(0(4)12, angle(horizontal) nogrid) ymtick(0(2)12) ///
	xtitle("", margin(top)) xscale(noextend nofextend) xlabel(1 "2001" 2 "2002" 3 "2003" 4 "2004" , angle(forty_five)) ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Treated" 2 "Control" ) position(12) ring(0) rows(1)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ysize(4) xsize(4) scale(*1.3)
restore

* Erase the data set that was created
foreach var of varlist residual_share {
erase "pretreat_`var'.dta"
}



*****************************************************
** Figure 4: Pre-treatment trends referendum outcomes
*****************************************************


* Data preparations
foreach var of varlist support_soc support_gre {
preserve
keep if date < td(26sep2004)

gen period = .
replace period = 1 if year == 2001
replace period = 2 if year == 2002
replace period = 3 if year == 2003
replace period = 4 if year == 2004

matrix mean1=J(4,1,.)
matrix var1=J(4,1,.)
matrix mean2=J(4,1,.)
matrix var2=J(4,1,.)

forvalues i=1(1)4{
capture reg `var' if ivotemun == 1 & period == `i', cl(municipality_code)
capture matrix mean1[`i',1]=e(b)  
capture matrix var1[`i',1]=e(V) 
capture reg `var' if ivotemun == 0 & period == `i', cl(municipality_code)
capture matrix mean2[`i',1]=e(b)  
capture matrix var2[`i',1]=e(V) 
}

svmat mean1, names(mean1)
svmat var1, names(var1)
svmat mean2, names(mean2)
svmat var2, names(var2)

gen mean11_low = mean11 - 1.96* sqrt(var11)
gen mean11_up = mean11 + 1.96* sqrt(var11)

gen mean21_low = mean21 - 1.96* sqrt(var21)
gen mean21_up = mean21 + 1.96* sqrt(var21)

gen x1 = _n + .05 in 1/4
gen x2 = _n - .05 in 1/4

keep x1 mean11 mean11_low mean11_up x2 mean21 mean21_low mean21_up
drop if x1 == .
save "pretreat_`var'.dta", replace
restore
}


* Support redistribution: only one referendum in 2001 in this sample --> combine 2001/2 
tab year if pickone == 1 & support_redistr != . & date < td(26sep2004)
foreach var of varlist support_redistr {
preserve
keep if date < td(26sep2004)

gen period = .
replace period = 1 if year == 2001
replace period = 1 if year == 2002
replace period = 2 if year == 2003
replace period = 3 if year == 2004

matrix mean1=J(3,1,.)
matrix var1=J(3,1,.)
matrix mean2=J(3,1,.)
matrix var2=J(3,1,.)

forvalues i=1(1)3{
capture reg `var' if ivotemun == 1 & period == `i', cl(municipality_code)
capture matrix mean1[`i',1]=e(b)  
capture matrix var1[`i',1]=e(V) 
capture reg `var' if ivotemun == 0 & period == `i', cl(municipality_code)
capture matrix mean2[`i',1]=e(b)  
capture matrix var2[`i',1]=e(V) 
}

svmat mean1, names(mean1)
svmat var1, names(var1)
svmat mean2, names(mean2)
svmat var2, names(var2)

gen mean11_low = mean11 - 1.96* sqrt(var11)
gen mean11_up = mean11 + 1.96* sqrt(var11)

gen mean21_low = mean21 - 1.96* sqrt(var21)
gen mean21_up = mean21 + 1.96* sqrt(var21)

gen x1 = _n + .05 in 1/3
gen x2 = _n - .05 in 1/3

keep x1 mean11 mean11_low mean11_up x2 mean21 mean21_low mean21_up
drop if x1 == .
save "pretreat_`var'.dta", replace
restore
}


* Support redistribution: only one referendum in 2003 and 2004 in this sample --> combine 2003/4 
tab year if pickone == 1 & support_redistr != . & date < td(26sep2004)
foreach var of varlist support_cultcons {
preserve
keep if date < td(26sep2004)

gen period = .
replace period = 1 if year == 2001
replace period = 2 if year == 2002
replace period = 3 if year == 2003
replace period = 3 if year == 2004

matrix mean1=J(3,1,.)
matrix var1=J(3,1,.)
matrix mean2=J(3,1,.)
matrix var2=J(3,1,.)

forvalues i=1(1)3{
capture reg `var' if ivotemun == 1 & period == `i', cl(municipality_code)
capture matrix mean1[`i',1]=e(b)  
capture matrix var1[`i',1]=e(V) 
capture reg `var' if ivotemun == 0 & period == `i', cl(municipality_code)
capture matrix mean2[`i',1]=e(b)  
capture matrix var2[`i',1]=e(V) 
}

svmat mean1, names(mean1)
svmat var1, names(var1)
svmat mean2, names(mean2)
svmat var2, names(var2)

gen mean11_low = mean11 - 1.96* sqrt(var11)
gen mean11_up = mean11 + 1.96* sqrt(var11)

gen mean21_low = mean21 - 1.96* sqrt(var21)
gen mean21_up = mean21 + 1.96* sqrt(var21)

gen x1 = _n + .05 in 1/3
gen x2 = _n - .05 in 1/3

keep x1 mean11 mean11_low mean11_up x2 mean21 mean21_low mean21_up
drop if x1 == .
save "pretreat_`var'.dta", replace
restore
}

* Support Socialists
preserve
use "pretreat_support_soc.dta", replace
twoway ///
	(scatter mean11 x1, sort msymbol(O) mcolor(black)) ///
	(scatter mean21 x2, sort msymbol(O) mcolor(gs10)) ///
	(line mean11 x1, sort lcolor(black) lpattern(solid)) ///
	(line mean21 x2, sort lcolor(gs10) lpattern(dash)) ///
	(rcap mean11_up mean11_low x1, sort lcolor(black) lpattern(solid)) ///
	(rcap mean21_up mean21_low x2, sort lcolor(gs10) lpattern(solid)) ///
	, ///
	ytitle("Annual averages (%)") yscale(noextend nofextend) ylabel(0(20)80, angle(horizontal) nogrid) ymtick(0(10)80) ///
	xtitle("", margin(top)) xscale(noextend nofextend) xlabel(1 "2001" 2 "2002" 3 "2003" 4 "2004" , angle(forty_five)) ///
	title("Support Socialists") ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Treated" 2 "Control" ) position(12) ring(0) rows(1)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ysize(4) xsize(4) scale(*1.3)
restore


* Support Greens
preserve
use "pretreat_support_gre.dta", replace
twoway ///
	(scatter mean11 x1, sort msymbol(O) mcolor(black)) ///
	(scatter mean21 x2, sort msymbol(O) mcolor(gs10)) ///
	(line mean11 x1, sort lcolor(black) lpattern(solid)) ///
	(line mean21 x2, sort lcolor(gs10) lpattern(dash)) ///
	(rcap mean11_up mean11_low x1, sort lcolor(black) lpattern(solid)) ///
	(rcap mean21_up mean21_low x2, sort lcolor(gs10) lpattern(solid)) ///
	, ///
	ytitle("Annual averages (%)") yscale(noextend nofextend) ylabel(0(20)80, angle(horizontal) nogrid) ymtick(0(10)80) ///
	xtitle("", margin(top)) xscale(noextend nofextend) xlabel(1 "2001" 2 "2002" 3 "2003" 4 "2004" , angle(forty_five)) ///
	title("Support Greens") ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Treated" 2 "Control" ) position(12) ring(0) rows(1)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ysize(4) xsize(4) scale(*1.3)
restore


* Support redistribution
preserve
use "pretreat_support_redistr.dta", replace
twoway ///
	(scatter mean11 x1, sort msymbol(O) mcolor(black)) ///
	(scatter mean21 x2, sort msymbol(O) mcolor(gs10)) ///
	(line mean11 x1, sort lcolor(black) lpattern(solid)) ///
	(line mean21 x2, sort lcolor(gs10) lpattern(dash)) ///
	(rcap mean11_up mean11_low x1, sort lcolor(black) lpattern(solid)) ///
	(rcap mean21_up mean21_low x2, sort lcolor(gs10) lpattern(solid)) ///
	, ///
	ytitle("Period averages (%)") yscale(noextend nofextend) ylabel(0(20)80, angle(horizontal) nogrid) ymtick(0(10)80) ///
	xtitle("", margin(top)) xscale(noextend nofextend) xlabel(1 "2001/2" 2 "2003" 3 "2004", angle(forty_five)) ///
	title("Support redistribution") ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Treated" 2 "Control" ) position(12) ring(0) rows(1)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ysize(4) xsize(4) scale(*1.3)
restore


* Support cultural conservatism
preserve
use "pretreat_support_cultcons.dta", replace
twoway ///
	(scatter mean11 x1, sort msymbol(O) mcolor(black)) ///
	(scatter mean21 x2, sort msymbol(O) mcolor(gs10)) ///
	(line mean11 x1, sort lcolor(black) lpattern(solid)) ///
	(line mean21 x2, sort lcolor(gs10) lpattern(dash)) ///
	(rcap mean11_up mean11_low x1, sort lcolor(black) lpattern(solid)) ///
	(rcap mean21_up mean21_low x2, sort lcolor(gs10) lpattern(solid)) ///
	, ///
	ytitle("Period averages (%)") yscale(noextend nofextend) ylabel(0(20)80, angle(horizontal) nogrid) ymtick(0(10)80) ///
	xtitle("", margin(top)) xscale(noextend nofextend) xlabel(1 "2001" 2 "2002" 3 "2003/4", angle(forty_five)) ///
	title("Support cultural conservatism") ///
	legend(lcolor(none) region(lcolor(white)) order(1 "Treated" 2 "Control" ) position(12) ring(0) rows(1)) ///
	scheme(s2mono) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ysize(4) xsize(4) scale(*1.3)
restore



* Erase the data sets that were created
foreach var of varlist support_soc support_gre support_redistr support_cultcons {
erase "pretreat_`var'.dta"
}

